home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 July / Macworld (1999-07).dmg / Shareware World / Info / For Developers / Network Info OSAX 1.2 / Read Me - Network Info OSAX < prev   
Text File  |  1999-04-27  |  9KB  |  156 lines

  1. Network Info OSAX 1.2 - by Carl W. Bell
  2. Copyright © 1996-1999 Baylor University 
  3.  
  4. Disclaimer: Although Network Info seems to work fine, it is distributed "as is". Use at your own risk. So there.
  5.  
  6. Network Info is an AppleScript scripting addition (OSAX) that contains three different commands: network information, AppleTalk zones, and AppleTalk entities. To use it, drop it into the Scripting Additions folder located in your Extensions folder or System folder. Please note that the file name has changed so if you have an old version (called "Network Info OSAX"), you will need to remove it by hand. Otherwise, you will get errors when trying to use the new terminology.
  7.  
  8. _________________________________________________________________
  9.  
  10. The Dictionary... 
  11.  
  12. network information: returns a record containing various network related stuff
  13.     network information
  14.         [opening TCP  boolean]  -- can open TCP [default is true]
  15.         [resolving IP name  boolean]  -- should resolve Mac’s IP name? [default is true]
  16.     Result:   list
  17.  
  18. AppleTalk zones: returns a list of AppleTalk zones
  19.     AppleTalk zones
  20.         [retry interval  small integer]  -- retry interval in seconds [default is 3]
  21.         [retry count  small integer]  -- retry count [default is 4]
  22.     Result:   list
  23.  
  24. AppleTalk entities: returns a list of entities on the AppleTalk network
  25.     AppleTalk entities
  26.         [object name  string]  -- the object name to search for [e.g., “Joe’s Macintosh”]
  27.         [entity type  string]  -- the type of entity to search for [e.g., “LaserWriter”]
  28.         [AppleTalk zone  string]  -- the zone in which to search [default is local zone]
  29.         [matching network number  integer]  -- only return entities matching network ID
  30.         [matching node ID  integer]  -- only return entities matching node ID
  31.         [matching socket  integer]  -- only return entities matching socket
  32.         [maximum  small integer]  -- the maximum number of entities to get [default is 32]
  33.         [retry interval  small integer]  -- the retry interval in seconds [default is 3]
  34.         [retry count  small integer]  -- the retry count [default is 4]
  35.         [object names only  boolean]  -- just return object names? [default is false]
  36.         [address details  boolean]  -- include address details? [default is false]
  37.     Result:   list
  38.  
  39. Class network information: gobs of network related info
  40. Properties:
  41.     ethernet address  string  [r/o]  -- the Mac's ethernet address
  42.     OpenTransport present  boolean  [r/o]  -- is OpenTransport present?
  43.     OpenTransport loaded  boolean  [r/o]  -- is OpenTransport loaded?
  44.     OpenTransport version  string  [r/o]  -- the version of OpenTransport
  45.     AppleTalk present  boolean  [r/o]  -- is AppleTalk present?
  46.     AppleTalk loaded  boolean  [r/o]  -- is AppleTalk loaded?
  47.     AppleTalk version  string  [r/o]  -- the version of AppleTalk
  48.     network ID  integer  [r/o]  -- the network number
  49.     node ID  integer  [r/o]  -- the node ID
  50.     router network number  integer  [r/o]  -- the network number of the Mac’s router
  51.     router node ID  integer  [r/o]  -- the node ID of the Mac’s router
  52.     AppleTalk zone  string  [r/o]  -- the local AppleTalk zone
  53.     TCPIP present  boolean  [r/o]  -- is TCP/IP present?
  54.     TCPIP loaded  boolean  [r/o]  -- is TCP/IP loaded?
  55.     TCPIP version  string  [r/o]  -- the version of TCP/IP
  56.     IP address  string  [r/o]  -- the Mac’s IP address in dotted decimal format, e.g., 129.62.1.12
  57.     IP name  string  [r/o]  -- the Mac’s IP domain name, e.g., www.baylor.edu
  58.     computer name  string  [r/o]  -- the computer’s (Chooser) name
  59.     owner name  string  [r/o]  -- the owner’s (FileSharing) name
  60.  
  61. Class AppleTalk entity: an AppleTalk entity
  62. Properties:
  63.     object name  string  [r/o]  -- the entity’s object name
  64.     entity type  string  [r/o]  -- the entity’s type
  65.     network ID  integer  [r/o]  -- the entity’s network number
  66.     node ID  integer  [r/o]  -- the entity’s node ID
  67.     socket  integer  [r/o]  -- the entity’s socket
  68.  
  69. _________________________________________________________________
  70.  
  71. Notes: 
  72.  
  73. network information 
  74.  
  75.      • network information will open TCP/IP by default which may have the side effect of dialing the modem for PPP connections. Adding a "without opening TCP" should stop this. 
  76.      • Setting "opening TCP" to false implicitly sets "resolving IP name" to false. 
  77.  
  78. AppleTalk zones 
  79.  
  80.      • The maximum number of zones that will be returned is 256. 
  81.      • If you don't get all the zones that you know you should, try adjusting the retry interval (how long to wait for responses) and retry count (how many times to request) values. 
  82.  
  83. AppleTalk entities 
  84.  
  85.      • You can use the "double-tilde" wildcard character when requesting object names types and entity types. Type option-x on a Mac keyboard to get this character. 
  86.      • AppleTalk entities will, by default, return a list of Class AppleTalk entities. Adding a "object names only" returns a sorted list of object names. This allows you to do something like:
  87.  
  88.               set LWs to (AppleTalk entities entity type "LaserWriter" with object names only)
  89.               choose from list LW
  90.  
  91.      • By default, the address details (network ID, node ID, and socket) for returned entities is not returned to avoid clutter. Add a "with address details" if you really want that info. 
  92.      • The "matching network ID/node ID/socket" should probably be a whose clause, but that would require more work on my part... 
  93.      • See notes above regardin retry interval/count values. 
  94.      • If you get exactly "maximum" responses back, there may be more entities that on the network that aren't in the returned list. Bump up the value and try again. 
  95.  
  96. Release Notes: 
  97.  
  98. 1.2 (22-Apr-99) 
  99.  
  100.      • Added properties to network info record: OpenTransport present, OpenTransport loaded, OpenTransport version, AppleTalk present, AppleTalk loaded, AppleTalk version, router network ID, router node ID, TCPIP present, TCPIP loaded, TCPIP version,  IP address, IP name, and owner name. 
  101.      • The property "local zone" has been renamed to "AppleTalk zone" and given the property ID 'patz' to match the dictionary in "Network Setup Extension". Likewise, "network number" has been changed to "network ID" and given the property ID 'otin'. "node ID" has been given the property ID 'otio'. network ID and node ID have also been changed to long integers. 
  102.      • If the local zone is not available, an empty string is returned rather than "<no zone>". 
  103.      • If computer name is not available, an empty string is returned rather than "<no name>". 
  104.      • Can now get a list of AppleTalk zones. 
  105.      • Can now get a list of AppleTalk entities. 
  106.      • Now returns better (ok, some) error strings when an error occurs. 
  107.      • Renamed from "Network Info OSAX" to "Network Info".
  108.  
  109. 1.1 (2-Jun-98)
  110.  
  111.      • Fixed terminology conflict with "Jon's Commands" (ethernet address).
  112.      • Fixed class IDs so that they are no longer all lowercase (which are reserved by Apple).
  113.      • Change some of the property names ("zone" -> "local zone" and "Chooser name" -> "computer name").
  114.  
  115. 1.0.1 (4-Jun-97)
  116.  
  117.      • Now returns the ethernet address when running OpenTransport
  118.  
  119. 1.0 (c. 1996)
  120.  
  121.      • Initial release
  122.  
  123. If you have any questions, comments, (constructive) criticism, or bug reports let me know. You can contact me at the address(es) below.
  124.  
  125. -cb 
  126.  
  127. Carl_Bell@baylor.edu
  128. Carl Bell's Web Page <http://www.baylor.edu/~Carl_Bell/>
  129. Stuff I've Written <http://www.baylor.edu/~Carl_Bell/>
  130.  
  131. Snail Mail:
  132.  
  133.        Carl W. Bell
  134.        Information Technology Center
  135.        Baylor University
  136.        P.O. Box 97268
  137.        Waco, TX 76798-7268
  138.  
  139. Phone:
  140.  
  141.        (254) 710-4065
  142.  
  143. Baylor's Fine Print:
  144.  
  145. This software, data and/or documentation contain trade secrets and confidential information which are proprietary to Baylor University. Their use or disclosure in whole or in part without the express written permission of Baylor University is prohibited.
  146.  
  147. This software, data and/or documentation are also unpublished works protected under the copyright laws of the United States of America. If these works become published, the following notice shall apply:
  148.  
  149. Copyright © 1996-1999 Baylor University
  150. All Rights Reserved
  151.  
  152. The name of Baylor University may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE, DATA AND/OR DOCUMENTATION ARE PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  153.  
  154. When permission has been granted to make copies of this software, data and/or documentation, the above notices must be retained on all copies.
  155.  
  156. Permission is hereby granted for non-commercial use and distribution of Network Info OSAX.